<template>
	<view @click="navigateBack" class="returnIcon">
		<image src="/static/returnIcon.png" mode="aspectFit"></image>
	</view>
</template>

<script>
	export default {
		name: "returnIcon",
		props: {
			backNum: {
				type: Number,
				default () {
					return 1
				}
			},
		},
		data() {
			return {

			};
		},
		methods: {
			navigateBack() {
				console.log(this.backNum);
				uni.navigateBack({
					delta: this.backNum,
					fail() {
						uni.reLaunch({
							url:'/pages/index/index'
						})
					}
				});
				
			}
		}
	}
</script>

<style lang="scss" scoped>
	.returnIcon {
		position: relative;
		z-index: 9;
		image{
		width: 90upx;
		height: 90upx;
	}}
</style>